bitkeeper revision 1.304.1.4 (3f0bde76AYbvHyA0ZKhVCX7Dwvw4sQ)
authorrac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk>
Wed, 9 Jul 2003 09:20:54 +0000 (09:20 +0000)
committerrac61@labyrinth.cl.cam.ac.uk <rac61@labyrinth.cl.cam.ac.uk>
Wed, 9 Jul 2003 09:20:54 +0000 (09:20 +0000)
Add new Extent partition number bits that were needed by the PhysicalList changes that I put in the last cset by mistake. Ah well.

tools/control/src/org/xenoserver/control/Extent.java

index 3e56f31d23d2f4dfab2b4eb9f5e40cc1721486e9..98dbea314eb2afd8ddcb13d27638bb8f687bbee6 100644 (file)
@@ -15,6 +15,8 @@ public class Extent {
     private long offset;
     /** Size of extent in sectors. */
     private long size;
+    /** Partition number, if one is allocated. */
+    private int partition_no;
 
     /**
      * Constructor for Extent.
@@ -27,6 +29,20 @@ public class Extent {
         this.offset = offset;
         this.size = size;
     }
+    
+    /**
+     * Constructor for Extent.
+     * @param disk Disk number.
+     * @param offset Offset into disk.
+     * @param size Size of extent.
+     * @param partition_no Partition number.
+     */
+    Extent(int disk, long offset, long size,int partition_no) {
+        this.disk = disk;
+        this.offset = offset;
+        this.size = size;
+        this.partition_no = partition_no;
+    }
 
     /**
      * @return Disk number.
@@ -62,4 +78,11 @@ public class Extent {
     public int getMinor() {
         return disk & 0xFF;
     }
+    
+    /**
+     * @return Partition number of this extent.
+     */
+    public int getPartitionNo() {
+        return partition_no;
+    }
 }